using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.VirtualFileSystem;

using WL.Think.Abp.Localization;
using WL.Think.Abp.Modules;

namespace WL.Think.Abp.OpenIddict;

[DependsOn(
    typeof(AbpOpenIddictDomainSharedModule),
    typeof(ThinkAbpCoreModule)
)]
public class ThinkAbpOpenIddictApplicationContractsModule : ThinkModule<ThinkAbpOpenIddictApplicationContractsModule>
{
    protected override void ConfigureLocalization(ServiceConfigurationContext context)
    {
        Configure<AbpLocalizationOptions>(options =>
        {
            options.Resources
                .Get<ThinkResource>()
                .AddVirtualJson("/Localization/OpenIddict");
        });
    }

    protected override void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
    {
        Configure<AbpVirtualFileSystemOptions>(options =>
        {
            options.FileSets.AddEmbedded<ThinkAbpOpenIddictApplicationContractsModule>();
        });

    }
}
